﻿<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title></title>
</head>
<body>
    <script>
        // 简单数据类型传参
        function fn(a) {
            // let a;
            // a = 10;
            a++;
            console.log(a);  // 11
        }
        var x = 10;
        fn(x);
        console.log(x);      // 10
    </script>
</body>
</html>